package ex.beans;

import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.servlet.Filter;
import java.util.LinkedHashMap;

/**
 * @program: LearShiroSpringMvc
 * @description:
 * @author: Mr.Dai
 * @create: 2020-03-15 00:17
 **/

public class Config {


    private  CustomAuthorizationFilter filter;


    private ShiroFilterFactoryBean shiroFilterFactoryBean;

    public void generateFilter(){
        LinkedHashMap<String, Filter> linkedHashMap = new LinkedHashMap<>();
        linkedHashMap.put("roleOrFilter",filter);
        shiroFilterFactoryBean.setFilters(linkedHashMap);
    }
}
